package chapter_08_bridge.p1_apply;

import chapter_08_bridge.p1_apply.abstractt.AbstractMessage;
import chapter_08_bridge.p1_apply.abstractt.CommonMessage;
import chapter_08_bridge.p1_apply.implementor.MessageImplementor;
import chapter_08_bridge.p1_apply.implementor.MessageMail;
import chapter_08_bridge.p1_apply.implementor.MessageSMS;

/**
 * Created by CharloYao on 2017/3/24.
 */
public class Client {

    public static void main(String[] args) {
        MessageImplementor messageImplementor = new MessageMail();
        AbstractMessage message = new CommonMessage(messageImplementor);
        message.sendMessage("来喝茶","张三");

        messageImplementor = new MessageSMS();
        message = new CommonMessage(messageImplementor);
        message.sendMessage("来喝茶","李四");

    }
}
